package com.embedsky.administrator.mycardreader.socket;

/**
 * Des:ClientManager manager base create finish and send function, and hold a listener for high level
 */
public class ClientManager implements IClientManager {

    private final ClientThread mClientThread;

    public ClientManager(String serverIp, int port, IClientListener listener) {
        mClientThread = new ClientThread(serverIp, port, listener);
        mClientThread.start();
    }

    @Override
    public void finish() {
        mClientThread.finish();
    }

    @Override
    public void sendData(String data) {
        mClientThread.sendData(data);
    }
}
